package com.note.simpleshop.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "tb_banner", schema = "simpleshop", catalog = "")
public class TbBanner {

    public static final Integer IS_SHOW1=1;
    public static final Integer IS_DELEETE0=0;
    public static final Integer IS_DELETE1=1;
    private String id;
    private String name;
    private String pic;
    private Integer sort;
    private String url;
    private Integer isShow;
    private Integer isDelete;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "pic")
    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    @Basic
    @Column(name = "sort")
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Basic
    @Column(name = "url")
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Basic
    @Column(name = "is_show")
    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    @Basic
    @Column(name = "is_delete")
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbBanner tbBanner = (TbBanner) o;
        return Objects.equals(id, tbBanner.id) &&
                Objects.equals(name, tbBanner.name) &&
                Objects.equals(pic, tbBanner.pic) &&
                Objects.equals(sort, tbBanner.sort) &&
                Objects.equals(url, tbBanner.url) &&
                Objects.equals(isShow, tbBanner.isShow) &&
                Objects.equals(isDelete, tbBanner.isDelete);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, pic, sort, url, isShow, isDelete);
    }
}
